libx86: Work around GCC being unable to spill the PIC hard register
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 19 Nov 2018 13:03:02 +0000 (13:03 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 19 Nov 2018 16:58:35 +0000 (16:58 +0000)
commit73ee5574084b9bfa6194c1096cb1e4ce76fedb3f
treeadcea17fc84d989c41a0ef70861646d759e45772
parent86d47adcd3c4f494456a3d6ee06e941b132e3eb2
libx86: Work around GCC being unable to spill the PIC hard register

Versions of GCC before 5 can't compile cpuid.c, and fail with the rather cryptic:

  In file included from lib/x86/cpuid.c:3:0:
  lib/x86/cpuid.c: In function ‘x86_cpuid_policy_fill_native’:
  include/xen/lib/x86/cpuid.h:25:5: error: inconsistent operand constraints in an ‘asm’
       asm ( "cpuid"
       ^

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54232 for more details.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/include/xen/lib/x86/cpuid.h